//
//  InterfacOrientation.m
//  PPT
//
//  Created by ZNGOO on 16/7/15.
//  Copyright © 2016年 韦儒健. All rights reserved.
//

#import "InterfacOrientation.h"

@implementation InterfacOrientation


#pragma  mark - 强制旋转横屏
+(void)setInterfacOrientation:(UIInterfaceOrientation)Orientation{
    if ([[UIDevice currentDevice] respondsToSelector:@selector(setOrientation:)]) {
        SEL selector = NSSelectorFromString(@"setOrientation:");
        NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[UIDevice instanceMethodSignatureForSelector:selector]];
        [invocation setSelector:selector];
        [invocation setTarget:[UIDevice currentDevice]];
        int val = Orientation;
        [invocation setArgument:&val atIndex:2];
        [invocation invoke];
    }
}
@end
